﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SteelDetection
{
    static class DataConverter
    {
        static Defectypes defecttypes = Defectypes.GetInstance();
        public static string ConvertTypeToIconStr(double type)
        {

            var dtype = type;

            var iconstr = defecttypes.Where(t => t.id == dtype).First().icon;

            return iconstr;
        }

        public static string ConvertTypeToName(double type)
        {

            var dtype = type;

            var typename = defecttypes.Where(t => t.id == type).First().name;

            return typename;

        }
    }
}
